home *** CD-ROM | disk | FTP | other *** search
/ Chip 2006 December / chip-cd_2006_12.zip / 12 / Pakiet internetowy / Stacje TV i radiowe (odsluchiwanie i rippowanie) / StationRipper 2.70c / StationRipperInst.exe / parse_rules.txt < prev    next >
Text File  |  2006-01-31  |  2KB  |  54 lines

  1. # This is an example of a file that can be customized for parsing metadata
  2. # Use it this like this:
  3. #     streamripper URL -w parse_rules.txt
  4.  
  5. # Lines that start with '#' are comments, and blank lines are ignored.
  6.  
  7. # Ignore metadata that begins with "A suivre"
  8. # The leading "m" says this is a match rule
  9. # The trailing "e" means drop the metadata
  10. m/^A users:/e
  11.  
  12. # Exclude tracks that contain the given expression
  13. # The leading "m" says this is a match rule
  14. # The trailing "x" means that the track should not be saved (excluded)
  15. ## m/advertisement/x
  16.  
  17. # Save tracks that contain the given expression
  18. # The leading "m" says this is a match rule
  19. # The trailing "s" means that the track should be saved
  20. ## m/[Ff]unk/s
  21.  
  22. # The first m//e, m//s or m//x rule that matches determines the 
  23. # action that is performed.  If none match, then by default the file 
  24. # will be saved.  If you prefer having the default being that the 
  25. # files aren't saved, include the following rule after all your 
  26. # other m//e, m//s or m//x rules.
  27. ## m//x
  28.  
  29. # Strip off anything like "- Mp3Pro" from the end of the string
  30. # The leading "s" says this is a substitution rule
  31. # The trailing "i" means case insensitive matching
  32. s/[[:space:]]*-?[[:space:]]*mp3pro$//i
  33.  
  34. # Strip off something like "- " from the beginning of the string
  35. ##s/^[[:space:]]*-[[:space:]]*//
  36.  
  37. # The strip rules don't have to be after the m//e, m//s and m//x 
  38. # rules.  You can interleave them.  Rules are always processed
  39. # in order.
  40.  
  41. # This is the normal parsing rule: "Artist - Title"
  42. # The trailing "A1" means that the artist (A) matches subpattern 1
  43. # The trailing "T2" means that the title (T) matches subpattern 2
  44. m/^[[:space:]]*([^-]*[^-[:space:]])[[:space:]]*-[[:space:]]*(.*)[[:space:]]*$/A1T2
  45.  
  46. # This is slightly different parsing rule: "Artist, Title"
  47. ## m/^[[:space:]]*([^,]*[^,[:space:]])[[:space:]]*,[[:space:]]*(.*)[[:space:]]*$/A1T2
  48.  
  49. # After the first match with an m//A or m//T rule, no more rules 
  50. # will be checked.
  51.  
  52. # If the metadata doesn't match any of the "m" rules, then the remaining 
  53. # metadata string (with substitutions) is entered into the "Title" field.
  54.